<div class="refentry"><a id="glLineWidth"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glLineWidth — specify the width of rasterized lines</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table class="funcprototype-table" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <strong class="fsfunc">glLineWidth</strong>(</code></td><td>GLfloat <var class="pdparam">width</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>width</code></em></span></dt><dd><p>
                    Specifies the width of rasterized lines.
                    The initial value is 1.
                </p></dd></dl></div></div><div class="refsect1"><a id="description"></a><h2>Description</h2><p>
            <code class="function">glLineWidth</code> specifies the rasterized width of
            lines.
        </p><p>
            The actual width is determined by rounding the supplied width
            to the nearest integer.
            (If the rounding results in the value 0,
            it is as if the line width were 1.)
            If
            <math overflow="scroll">

                <mrow>
                    <mfenced open="∣" close="∣">
                        <mrow>
                            <mo>Δ</mo>
                            <mi mathvariant="italic">x</mi>
                        </mrow>
                    </mfenced>
                    <mo>&gt;=</mo>
                    <mfenced open="∣" close="∣">
                        <mrow>
                            <mo>Δ</mo>
                            <mi mathvariant="italic">y</mi>
                        </mrow>
                    </mfenced>
                </mrow>
            </math>,
            <span class="emphasis"><em>i</em></span> pixels are filled in each column that is rasterized,
            where <span class="emphasis"><em>i</em></span> is the rounded value of <em class="parameter"><code>width</code></em>.
            Otherwise,
            <span class="emphasis"><em>i</em></span> pixels are filled in each row that is rasterized.
        </p><p>
            There is a range of supported line widths.  Only width 1 is guaranteed to be supported; others depend on the
            implementation.
            To query the range of supported widths, call <a class="citerefentry" href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a>
            with argument <code class="constant">GL_ALIASED_LINE_WIDTH_RANGE</code>.
        </p></div><div class="refsect1"><a id="notes"></a><h2>Notes</h2><p>
            The line width specified by <code class="function">glLineWidth</code> is always returned when <code class="constant">GL_LINE_WIDTH</code>
            is queried.
            Clamping and rounding have no effect on the specified value.
        </p><p>
            Line width may be clamped to an implementation-dependent maximum.  Call <a class="citerefentry" href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with <code class="constant">GL_ALIASED_LINE_WIDTH_RANGE</code> to determine the maximum width.
        </p></div><div class="refsect1"><a id="errors"></a><h2>Errors</h2><p>
            <code class="constant">GL_INVALID_VALUE</code> is generated if <em class="parameter"><code>width</code></em> is less than or equal to 0.
        </p></div><div class="refsect1"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
            <a class="citerefentry" href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_LINE_WIDTH</code>
        </p><p>
            <a class="citerefentry" href="glGet"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_ALIASED_LINE_WIDTH_RANGE</code>
        </p></div>
        {$pipelinestall}{$examples}
        <div class="refsect1"><a id="seealso"></a><h2>See Also</h2><p>
            <a class="citerefentry" href="glEnable"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>
        </p></div><div class="refsect1"><div id="Copyright"><h2>Copyright</h2><p>
            Copyright © 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a class="ulink" href="https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/" target="_top">https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></div>
